package interfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface DataNodeDef extends Remote {

    /**
     * 汇报块信息
     * @param inp BlockReportRequest
     * @return BlockReportRequest
     */
    byte[] sendBlockReport(byte[] inp) throws RemoteException;

    /**
     * 读取块
     * @param inp readBlockRequest
     * @return readBlockResponse
     * @throws RemoteException
     */
    byte[] readBlock(byte[] inp) throws RemoteException;

    /**
     * 写块
     * @param inp writeBlockRequest
     * @return writeBlockResponse
     * @throws RemoteException
     */
    byte[] writeBlock(byte[] inp) throws RemoteException;

    byte[] heartBeat(byte[] inp) throws RemoteException;

    byte[] transPort(byte[] inp) throws RemoteException;
}
